export const checkAuth = ({ auth, loginUser }) => {
  let authList =
    (loginUser &&
      loginUser.authorities.map(({ name }) => {
        return name;
      })) ||
    [];
  let hasAuth = !auth || (auth && authList.some(check => check.includes(auth)));
  return hasAuth;
};
